/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Android.Medecin;

import Modele.DAO;
import android.app.Activity;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
import java.util.List;

/**
 *
 * @author mouachani
 */
public class AutreActivity extends ListActivity {
    
    public void onCreate(Bundle icicle) {
        
        super.onCreate(icicle);
        // on va chercher la vue
        setContentView(R.layout.autrevue);
        TextView label = (TextView)findViewById(R.id.label);
        Intent inter = getIntent();
        String dep = inter.getStringExtra("leDep");
        label.setText(dep);
        
        List l = DAO.getLesMeds(dep);
                
        MedAdapter adapter = new MedAdapter(l, this);
        setListAdapter(adapter);
        
    }
    
}
